using SumerCoreDevOps.Shared.Enums;

namespace SumerCoreDevOps.Shared.Models.Messages;

/// <summary>
/// 凭证响应消息
/// </summary>
public class CredentialResponseMessage
{
    /// <summary>
    /// 任务ID
    /// </summary>
    public long TaskId { get; set; }

    /// <summary>
    /// 凭证类型
    /// </summary>
    public CredentialType CredentialType { get; set; }

    /// <summary>
    /// 是否成功
    /// </summary>
    public bool Success { get; set; }

    /// <summary>
    /// 错误消息（失败时）
    /// </summary>
    public string? ErrorMessage { get; set; }

    /// <summary>
    /// 加密后的凭证（JSON格式）
    /// </summary>
    public string? EncryptedCredential { get; set; }

    /// <summary>
    /// 有效期（分钟）
    /// </summary>
    public int ValidMinutes { get; set; }
}
